<?php

namespace app\job\controller;


use app\common\library\alipay\AliPay;
use app\common\library\easywechat\AppMp;
use app\common\library\easywechat\WxPay;

/**
 * 微信支付回调
 */
class PublicController
{
    public function testMsg()
    {
//        log_write('AssembleBillMsg: ' . '__发送拼团成功发货短信:' . json_encode([162, 163]), 'task');
//        event('AssembleBillMsg', [162, 163]);
        event('OverTimeOrderMsg');
    }



    /**
     * 返回封装后的 API 数据到客户端
     */
    protected function renderJson($code = 1, $msg = '', $data = [])
    {
        return compact('code', 'msg', 'data');
    }

    /**
     * 返回操作成功json
     */
    protected function renderSuccess($msg = 'success', $data = [])
    {
        return json($this->renderJson(1, $msg, $data));
    }

    /**
     * 返回操作失败json
     */
    protected function renderError($msg = 'error', $data = [], $code = 0)
    {
        return json($this->renderJson($code, $msg, $data));
    }
}
